package cloud.dandanit.itservice.service.impl;

import cloud.dandanit.itservice.entity.record.VideoRecord;
import cloud.dandanit.itservice.mapper.record.VideoRecordMapper;
import cloud.dandanit.itservice.service.record.VideoRecordService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 课程简介 服务实现类
 * </p>
 *
 * @author luokai
 * @since 2022-07-07
 */
@Service
public class VideoRecordServiceImpl extends ServiceImpl<VideoRecordMapper, VideoRecord> implements VideoRecordService {

    @Autowired
    private VideoRecordMapper videoRecordMapper;

    /**
     * 增加记录
     */
    @Override
    public void addRecord() {
        VideoRecord videoRecord = new VideoRecord();
        this.save(videoRecord);
    }

    /**
     * 统计记录
     * @param day 指定天
     * @return 条数
     */
    @Override
    public Integer statisticsData(String day) {

        Integer count = videoRecordMapper.statisticsData(day);
        return count;
    }
}
